﻿using System;

namespace DynaPrecision.StandardFunction
{
	public class Sin<TInput, TResult> : FunctionAnalysis.IFunction<TInput, TResult>
	{

		#region IFunction<TInput,TResult> Members

		public Func<TInput, TResult> Functor
		{
			get { return x => Math.Sin((dynamic)x); }
		}

		public FunctionAnalysis.IFunction<TInput, TResult> Derivative
		{
			get { return new Cos<TInput, TResult>(); }
		}

		public FunctionAnalysis.IFunction<TInput, TResult> Integral
		{
			get { return new FunctionAnalysis.FunctionValueProduct<Cos<TInput, TResult>, TInput, TResult>(new Cos<TInput, TResult>(), (dynamic)(-1)); }
		}

		#endregion
	}
}
